home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
termsorc.lha
/
Extras
/
Source
/
term-source.lha
/
termGlobal.h
< prev
next >
Wrap
Text File
|
1995-09-26
|
45KB
|
1,750 lines
/*
** termGlobal.h
**
** Global data structure definitions
**
** Copyright © 1990-1995 by Olaf `Olsen' Barthel
** All Rights Reserved
*/
/* The configuration file format version. This will from now
* on hopefully stay the same.
*/
#define CONFIG_FILE_VERSION 4
#define CONFIG_FILE_REVISION 3
// The asynchronous xpr_sread gets enabled by this
#define ASYNC_XPR_SREAD 1
// IDCMP flags for the main window
#define DEFAULT_IDCMP (IDCMP_RAWKEY | IDCMP_INACTIVEWINDOW | IDCMP_ACTIVEWINDOW | IDCMP_MOUSEMOVE | IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MENUPICK | IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_CLOSEWINDOW | IDCMP_NEWSIZE | IDCMP_IDCMPUPDATE | IDCMP_MENUHELP)
/* Jump table entry. */
typedef BYTE (* JUMP)(UBYTE Char);
/* Pointer to function returning nothing. */
typedef VOID (* VPTR)();
/* Capture output routine. */
typedef VOID (* __regargs COPTR)(register APTR Data,register LONG Size);
/* Menu item codes. */
enum { MEN_SAVE_AS_PICTURE=1,MEN_SAVE_AS_TEXT,MEN_PRINT_SCREEN,MEN_PRINT_CLIP,MEN_CAPTURE_TO_FILE,
MEN_CAPTURE_TO_PRINTER,MEN_ICONIFY,MEN_ABOUT,MEN_QUIT,
MEN_COPY,MEN_PASTE,MEN_CLEAR,
MEN_EXECUTE_DOS_COMMAND,MEN_EXECUTE_REXX_COMMAND,MEN_RECORD,MEN_RECORD_LINE,
MEN_EDIT_TRAPS,MEN_DISABLE_TRAPS,
MEN_PHONEBOOK,MEN_REDIAL,MEN_DIAL_NUMBER,MEN_SEND_BREAK,
MEN_HANG_UP,MEN_WAIT,MEN_FLUSH_BUFFER,MEN_RELEASE_DEVICE,
MEN_UPLOAD_ASCII,MEN_DOWNLOAD_ASCII,MEN_UPLOAD_TEXT,MEN_DOWNLOAD_TEXT,MEN_EDIT_AND_UPLOAD_TEXT,
MEN_UPLOAD_BINARY,MEN_DOWNLOAD_BINARY,
MEN_CLEAR_BUFFER,MEN_DISPLAY_BUFFER,MEN_CLOSE_BUFFER,MEN_FREEZE_BUFFER,MEN_OPEN_BUFFER,
MEN_SAVE_BUFFER_AS,
MEN_CLEAR_SCREEN,MEN_RESET_FONT,MEN_RESET_STYLES,MEN_RESET_TERMINAL,
MEN_SERIAL,MEN_MODEM,MEN_SCREEN,MEN_TERMINAL,MEN_SET_EMULATION,MEN_CLIPBOARD,MEN_CAPTURE,MEN_COMMANDS,
MEN_MISC,MEN_PATH,MEN_TRANSFER_PROTOCOL,MEN_TRANSFER,MEN_TRANSLATION,MEN_MACROS,
MEN_CURSORKEYS,MEN_FAST_MACROS,MEN_HOTKEYS,MEN_SPEECH,MEN_SOUND,MEN_RATES,MEN_SET_CONSOLE,MEN_OPEN_SETTINGS,MEN_SAVE_SETTINGS,
MEN_SAVE_SETTINGS_AS,
MEN_STATUS_WINDOW,MEN_REVIEW_WINDOW,MEN_PACKET_WINDOW,MEN_CHAT_LINE,MEN_FAST_MACROS_WINDOW,
MEN_UPLOAD_QUEUE_WINDOW,
// Avoid recompilation
MEN_PRINT_SCREEN_AS_GFX,
MEN_EXTRA_DIAL,
MEN_MATRIX_WINDOW,
MEN_CAPTURE_TO_RAW_FILE
};
/* Menu item code limit, required by the quick dial menu. */
#define DIAL_MENU_LIMIT 1000
/* How many phone book entries will be stored in
* the quick dial menu.
*/
#define DIAL_MENU_MAX 50
/* Undefine the following symbols, the preferences header file
* will use the same names and the same values.
*/
#undef PARITY_NONE
#undef PARITY_EVEN
#undef PARITY_ODD
#undef PARITY_MARK
#undef PARITY_SPACE
/* Serial settings. */
enum { PARITY_NONE,PARITY_EVEN,PARITY_ODD,PARITY_MARK,PARITY_SPACE };
enum { HANDSHAKING_NONE,HANDSHAKING_RTSCTS,HANDSHAKING_RTSCTS_DSR };
enum { DUPLEX_FULL,DUPLEX_HALF };
enum { FLOW_NONE,FLOW_XON_XOFF };
/* Terminal settings. */
enum { EOL_IGNORE,EOL_CR,EOL_LF,EOL_CRLF,EOL_LFCR };
enum { EMULATION_ANSIVT100,EMULATION_ATOMIC,EMULATION_TTY,EMULATION_EXTERNAL,EMULATION_HEX };
enum { COLOUR_AMIGA,COLOUR_EIGHT,COLOUR_SIXTEEN,COLOUR_MONO };
/* Protocol types. */
enum { PROTOCOL_XMODEM,PROTOCOL_XMODEMCRC,PROTOCOL_YMODEM,PROTOCOL_ZMODEM };
/* Font types. */
enum { FONT_STANDARD,FONT_IBM,FONT_IBM_RAW };
/* Bell modes. */
enum { BELL_NONE, BELL_VISIBLE, BELL_AUDIBLE, BELL_BOTH, BELL_SYSTEM };
/* Data flow scanner indices. */
enum { SCAN_NOCARRIER, SCAN_CONNECT, SCAN_VOICE, SCAN_RING, SCAN_BUSY, SCAN_NODIALTONE,
SCAN_OK, SCAN_ERROR, SCAN_SIGDEFAULTUPLOAD, SIG_DEFAULTUPLOAD,
SCAN_SIGASCIIUPLOAD,SCAN_SIGASCIIDOWNLOAD, SCAN_SIGTEXTUPLOAD,
SCAN_SIGTEXTDOWNLOAD, SCAN_SIGBINARYUPLOAD,
SCAN_SIGBINARYDOWNLOAD, SCAN_COUNT
};
/* Status types. */
enum { STATUS_READY,STATUS_HOLDING,STATUS_DIALING,STATUS_UPLOAD,
STATUS_DOWNLOAD,STATUS_BREAKING,STATUS_HANGUP,
STATUS_RECORDING,STATUS_RECORDING_LINE
};
/* Sound types. */
enum { SOUND_BELL,SOUND_CONNECT,SOUND_DISCONNECT,SOUND_GOODTRANSFER,
SOUND_BADTRANSFER,SOUND_RING,SOUND_VOICE,SOUND_ERROR,
SOUND_COUNT
};
/* Settings types. */
enum { PREF_ALL,PREF_SERIAL,PREF_MODEM,PREF_COMMAND,PREF_SCREEN,
PREF_TERMINAL,PREF_PATH,PREF_MISC,PREF_CLIP,PREF_CAPTURE,
PREF_FILE,PREF_EMULATION,PREF_TRANSFER,PREF_TRANSLATIONFILENAME,
PREF_MACROFILENAME,PREF_CURSORFILENAME,PREF_FASTMACROFILENAME,
PREF_RATES
};
/* Status line modes. */
enum { STATUSLINE_DISABLED,STATUSLINE_STANDARD,STATUSLINE_COMPRESSED };
/* Capture filter modes. */
enum { FILTER_NONE,FILTER_ESCAPE,FILTER_CONTROL,FILTER_BOTH };
/* Scrolling modes. */
enum { SCROLL_JUMP,SCROLL_SMOOTH };
/* Auto-capture file creation. */
enum { AUTOCAPTURE_DATE_NAME,AUTOCAPTURE_DATE_INCLUDE };
/* Cursor and numeric keypad modes. */
enum { KEYMODE_STANDARD,KEYMODE_APPLICATION };
/* Font scales. */
enum { SCALE_NORMAL,SCALE_HALF };
enum { SCALE_ATTR_NORMAL,SCALE_ATTR_TOP2X,SCALE_ATTR_BOT2X,SCALE_ATTR_2X };
/* Character tables. */
enum { TABLE_ASCII,TABLE_GFX };
/* Transfer types. */
enum { TRANSFER_BINARY,TRANSFER_TEXT,TRANSFER_ASCII };
/* Translation table entry types. */
enum { TRANSLATE_SINGLE,TRANSLATE_STRING };
/* Upload panel actions. */
enum { UPLOAD_TEXT=1,UPLOAD_BINARY,UPLOAD_IGNORE,UPLOAD_ABORT,
UPLOAD_TEXT_FROM_LIST,UPLOAD_BINARY_FROM_LIST,UPLOAD_DUMMY
};
/* Alert types. */
enum { ALERT_NONE,ALERT_BEEP,ALERT_SCREEN,ALERT_BEEP_SCREEN };
/* Online time display modes. */
enum { ONLINETIME_TIME,ONLINETIME_COST,ONLINETIME_BOTH };
/* Clipboard read errors. */
enum { CLIPERR_NONE,CLIPERR_NOTEXT,CLIPERR_IFF,CLIPERR_OPEN,CLIPERR_MEM };
/* What to print. */
enum { PRINT_SCREEN,PRINT_CLIP };
/* Dial command types. */
enum { DIAL_IGNORE,DIAL_LIST,DIAL_REDIAL };
/* Errors returned by ReconfigureSerial(). */
enum { RECONFIGURE_FAILURE,RECONFIGURE_NOCHANGE,RECONFIGURE_SUCCESS };
/* Operation codes for SetItem(). */
enum { SETITEM_SETCHECK,SETITEM_CLRCHECK,SETITEM_ON,SETITEM_OFF };
/* File identification actions. */
enum { IDENTIFY_IGNORE,IDENTIFY_FILETYPE,IDENTIFY_SOURCE };
/* Generic list types. */
enum { GLIST_UPLOAD,GLIST_DOWNLOAD,GLIST_DIAL,GLIST_WAIT,GLIST_TRAP,GLIST_COUNT };
/* Generic list add operations. */
enum { ADD_GLIST_BOTTOM,ADD_GLIST_TOP,ADD_GLIST_BEHIND,ADD_GLIST_BEFORE };
/* Dialing modes. */
enum { DIALMODE_PULSE, DIALMODE_TONE };
/* Transfer window gadgets. */
enum { GAD_TRANSFER_INFORMATION_LIST=1,
GAD_TRANSFER_PERCENT,GAD_TRANSFER_TIME,
GAD_TRANSFER_ABORT,GAD_TRANSFER_SKIP,
GAD_TRANSFER_PROTOCOL,GAD_TRANSFER_FILE,
GAD_TRANSFER_SIZE,GAD_TRANSFER_SECONDS,
GAD_TRANSFER_TOTALTIME,GAD_TRANSFER_ERRORS,
GAD_TRANSFER_ABORT_FILE
};
/* How to satisfy OwnDevUnit.library requests. */
enum { ODU_RELEASE,ODU_WAIT,ODU_KEEP };
/* When to notify the user during a file transfer. */
enum { XFERNOTIFY_NEVER,XFERNOTIFY_ALWAYS,XFERNOTIFY_START,XFERNOTIFY_END };
/* XPR options setting. */
enum { GAD_XPROPTIONS_USE=42,GAD_XPROPTIONS_CANCEL };
// Terminal types
enum { TERMINAL_VT200,TERMINAL_VT102,TERMINAL_VT101,TERMINAL_VT100 };
/* AmigaGuide help context. */
enum { CONTEXT_MAIN,CONTEXT_SERIAL,CONTEXT_MODEM,CONTEXT_SCREEN,
CONTEXT_TERMINAL,CONTEXT_CLIP,CONTEXT_CAPTURE,CONTEXT_COMMAND,
CONTEXT_MISC,CONTEXT_PATHS,CONTEXT_TRANSLATION,CONTEXT_MACROS,
CONTEXT_CURSOR,CONTEXT_FASTMACROS,CONTEXT_HOTKEYS,CONTEXT_SPEECH,
CONTEXT_EMULATION,CONTEXT_TRANSFER,CONTEXT_PHONEBOOK,CONTEXT_DATE,
CONTEXT_DAY,CONTEXT_IMPORT,CONTEXT_RATES,CONTEXT_TIME,
CONTEXT_COPY,CONTEXT_PASSWORDUSER,CONTEXT_DIAL,CONTEXT_PRINT,
CONTEXT_TEXTBUFFER,CONTEXT_PACKETWINDOW,CONTEXT_SOUND,
CONTEXT_LIBS,CONTEXT_ASCII,CONTEXT_PENS,CONTEXT_UPLOAD_QUEUE,
CONTEXT_TRAPS,CONTEXT_AREA_CODES,CONTEXT_MAIN_MENU,
CONTEXT_BUFFER_MENU,CONTEXT_PACKET_MENU,CONTEXT_PROJECT_MEN,
CONTEXT_EDIT_MEN,CONTEXT_CMDS_MEN,CONTEXT_PHONE_MEN,
CONTEXT_TRANSF_MEN,CONTEXT_BUFFER_MEN,CONTEXT_TERMINAL_MEN,
CONTEXT_SETTINGS_MEN,CONTEXT_WINDOWS_MEN,CONTEXT_DIAL_MEN,
CONTEXT_TEXTPEN_PANEL,CONTEXT_ASCII_TRANSFER_SETTINGS,
CONTEXT_PARAMETERS,CONTEXT_SIGNATURE
};
/* Character types. */
enum { CHAR_VANILLA,CHAR_CURSOR,CHAR_FUNCTION,CHAR_HELP,
CHAR_XON,CHAR_XOFF,CHAR_ENTER,CHAR_RETURN };
/* Review window positioning codes. */
enum { REVIEW_MOVE_TOP,REVIEW_MOVE_BOTTOM,REVIEW_MOVE_UP,REVIEW_MOVE_DOWN };
/* File type classes. */
enum { FILETYPE_NONE,FILETYPE_DIR,FILETYPE_FILE,FILETYPE_TEXT,FILETYPE_SOUND,
FILETYPE_PICTURE,FILETYPE_PREFS,FILETYPE_ARCHIVE,
FILETYPE_PROGRAM,
FILETYPE_COUNT };
/* Text pacing modes. */
enum { PACE_DIRECT,PACE_ECHO,PACE_ANYECHO,PACE_PROMPT,PACE_DELAY,PACE_KEYBOARD };
/* Where to open the buffer text window. */
enum { BUFFER_TOP,BUFFER_END };
/* Where to place the buffer screen horizontally. */
enum { SCREEN_LEFT,SCREEN_CENTRE,SCREEN_RIGHT };
/* File transfer mode. */
enum { XFER_XPR,XFER_EXTERNALPROGRAM,XFER_DEFAULT,XFER_INTERNAL };
/* File transfer protocol signatures. */
enum { TRANSFERSIG_DEFAULTUPLOAD,TRANSFERSIG_DEFAULTDOWNLOAD,
TRANSFERSIG_ASCIIUPLOAD,TRANSFERSIG_ASCIIDOWNLOAD,
TRANSFERSIG_TEXTUPLOAD,TRANSFERSIG_TEXTDOWNLOAD,
TRANSFERSIG_BINARYUPLOAD,TRANSFERSIG_BINARYDOWNLOAD
};
/* Requester modes. */
enum { REQUESTERMODE_CENTRE,REQUESTERMODE_PREFS,
REQUESTERMODE_IGNORE
};
/* Buffer capture modes. */
enum { BUFFERMODE_FLOW, BUFFERMODE_REVIEW };
/* How to sort the phonebook. */
enum { SORT_NAME,SORT_NUMBER,SORT_COMMENT,SORT_SELECTION };
/* Some raw key codes. */
#define HELP_CODE 95
#define DEL_CODE 70
#define BACKSPACE_CODE 65
#define RAMIGA_CODE 103
#define TAB_CODE 66
#define CURSOR_UP_CODE 76
#define CURSOR_DOWN_CODE 77
#define CURSOR_RIGHT_CODE 78
#define CURSOR_LEFT_CODE 79
#define F01_CODE 80
#define F02_CODE 81
#define F03_CODE 82
#define F04_CODE 83
#define F05_CODE 84
#define F06_CODE 85
#define F07_CODE 86
#define F08_CODE 87
#define F09_CODE 88
#define F10_CODE 89
/* A couple of useful minterms. */
#define MINTERM_ZERO 0
#define MINTERM_ONE ABC | ABNC | ANBC | ANBNC | NABC | NABNC | NANBC | NANBNC
#define MINTERM_COPY ABC | ABNC | NABC | NABNC
#define MINTERM_NOT_C ABNC | ANBNC | NABNC | NANBNC
#define MINTERM_B_AND_C ABC | NABC
#define MINTERM_NOT_B_AND_C ANBC | NANBC
#define MINTERM_B_OR_C ABC | ABNC | NABC | NABNC | ANBC | NANBC
/* Printer control bits. */
#define PRINT_SERIAL (1L << 0)
#define PRINT_MODEM (1L << 1)
#define PRINT_SCREEN (1L << 2)
#define PRINT_TERMINAL (1L << 3)
#define PRINT_USERNAME (1L << 4)
#define PRINT_COMMENT (1L << 5)
#define PRINT_SIZE (1L << 6)
#define PRINT_DATE (1L << 7)
#define PRINT_BITS (1L << 8)
/* Day of week flags. */
#define DAY_MONDAY (1L << 0)
#define DAY_TUESDAY (1L << 1)
#define DAY_WEDNESDAY (1L << 2)
#define DAY_THURSDAY (1L << 3)
#define DAY_FRIDAY (1L << 4)
#define DAY_SATURDAY (1L << 5)
#define DAY_SUNDAY (1L << 6)
/* These signal masks will make life a bit easier. */
#define SIG_WINDOW (1L << Window -> UserPort -> mp_SigBit)
#define SIG_SERIAL (ReadPort ? 1L << ReadPort -> mp_SigBit : NULL)
#define SIG_TIMER (1L << TimePort -> mp_SigBit)
#define SIG_QUEUE (SpecialQueue -> SigMask)
#define SIG_CHECK (1L << CheckBit)
#define SIG_WORKBENCH (1L << WorkbenchPort -> mp_SigBit)
#define SIG_REXX (1L << TermRexxPort -> mp_SigBit)
/* Task termination and handshake signal. Note: don't try this at
* home kids, we are all trained professionals here!
*/
#define SIG_KILL SIGBREAKF_CTRL_C
#define SIG_HANDSHAKE SIGF_SINGLE
/* Double-buffered file server command. */
#define SIG_COMMAND SIGBREAKF_CTRL_D
/* ARexx break signal. */
#define SIG_BREAK SIGBREAKF_CTRL_D
/* Hotkey reset command. */
#define SIG_RESET SIGBREAKF_CTRL_D
/* Skip dial entry. */
#define SIG_SKIP SIGBREAKF_CTRL_D
/* Status commands. */
#define SIG_BELL SIGBREAKF_CTRL_D
#define SIG_RESETTIME SIGBREAKF_CTRL_E
/* Buffer special signals. */
#define SIG_TOFRONT SIGBREAKF_CTRL_D
#define SIG_UPDATE SIGBREAKF_CTRL_E
#define SIG_MOVEUP SIGBREAKF_CTRL_F
/* Status display task. */
#define SIG_CLOSEWINDOW SIGBREAKF_CTRL_F
/* Upload queue. */
#define SIG_SHOW SIGBREAKF_CTRL_D
#define SIG_HIDE SIGBREAKF_CTRL_E
#define SIG_GOAWAY SIGBREAKF_CTRL_F
/* A port signal mask. */
#define PORTMASK(P) (1L << (((struct MsgPort *)(P)) -> mp_SigBit))
/* Replacements for CheckItem() and OnMenu()/OffMenu(). */
#define CheckItem(ID,Mode) SetItem(ID,Mode ? SETITEM_SETCHECK : SETITEM_CLRCHECK)
#define OnItem(ID) SetItem(ID,SETITEM_ON)
#define OffItem(ID) SetItem(ID,SETITEM_OFF)
/* A handy signal macro. */
#define ClrSignal(Signals) SetSignal(0,Signals)
/* Another neat macro. */
#define NumElements(s) (sizeof(s) / sizeof((s)[0]))
#define NEW(t) t = AllocVecPooled(sizeof(* ## t),MEMF_ANY | MEMF_CLEAR)
#define DISPOSE(x) { FreeVecPooled(x); x = NULL; }
/* Definitions to access the line signal setting functions supported by
* some IO serial boards (namely the ASDG board).
*/
#define SIOCMD_SETCTRLLINES (CMD_NONSTD + 7)
#define SIOB_RTSB 0
#define SIOB_DTRB 1
#define SIOB_RTSF (1L << SIOB_RTSB)
#define SIOB_DTRF (1L << SIOB_DTRB)
/* Turn time of day into `compressed' format. */
#define DT_GET_TIME(Hour,Minute) ((Minute) / 10 + (Hour) * 6)
/* Vector offsets for the TimeDate structure. */
enum { DT_FIRST_UNIT,DT_NEXT_UNIT };
/* Multiply lines and columns with the current font size. */
#define MUL_X(x) OffsetXTable[x]
#define MUL_Y(y) OffsetYTable[y]
/* A handy and short alias. */
#define TICK (CHECKIT | MENUTOGGLE)
/* For now the maximum length of a path/file name. */
#define MAX_FILENAME_LENGTH 256
/* The maximum width of a line to be stored in the text buffer. */
#define BUFFER_LINE_MAX 255
/* User interface definitions. */
#define SZ_AutoWidth TAG_USER+2 /* Use default width? */
#define SZ_NewColumn TAG_USER+4 /* Start new column */
#define SZ_Lines TAG_USER+5 /* Number of lines in object */
/* Box information types. */
enum { BOX_LEFT,BOX_TOP,BOX_WIDTH,BOX_HEIGHT };
/* Status gadget properties. */
#define SGA_FullWidth (TAG_USER+42)
#define SGA_Mode (TAG_USER+43)
/* Sizing gadget sizes. */
#define SIZE_GADGET_WIDTH_HIGH 18
#define SIZE_GADGET_WIDTH_LOW 13
/* Some windows to be opened on the main screen. */
enum { WINDOW_PACKET,WINDOW_STATUS,WINDOW_FILE,
WINDOW_REVIEW,WINDOW_FAST,WINDOW_FONT,
WINDOW_SCREEN,WINDOW_PERF,WINDOW_MAIN,
WINDOW_COUNT };
/* Window alignment information. */
#define WC_ALIGNLEFT (1<<0)
#define WC_ALIGNRIGHT (1<<1)
#define WC_ALIGNTOP (1<<2)
#define WC_ALIGNBOTTOM (1<<3)
#define WC_EXPANDWIDTH (1<<4)
#define WC_EXPANDHEIGHT (1<<5)
#define WC_ALIGNSIDE (1<<6)
#define WC_ALIGNBELOW (1<<7)
/* The chat line gadget ID. */
#define CHAT_ID 744
/* Screen mode list entry. */
struct ModeNode
{
struct Node VanillaNode;
ULONG DisplayID;
};
/* Trap management. */
struct TrapNode
{
struct Node Node;
LONG Count,
SequenceLen;
STRPTR Sequence,
Command;
};
/* Trap preferences, not much. */
struct TrapSettings
{
BYTE Enabled,
Pad;
};
/* Window alignment data. */
struct WindowInfo
{
UWORD ID;
UWORD WindowFlags;
LONG Left,
Top,
Width,
Height;
};
/* Special character treatment. */
struct SpecialKey
{
UBYTE Key;
BYTE (* Routine)(VOID);
};
/* Cursor backup data. */
struct CursorData
{
struct TextFont *CurrentFont;
WORD CursorX,
CursorY;
UBYTE Charset;
UBYTE CharMode[2];
UBYTE Attributes;
UBYTE FgPen,
BgPen;
UBYTE Style;
};
/* File transfer information. */
struct FileTransferNode
{
struct MinNode Node;
ULONG Size;
STRPTR Name;
};
struct FileTransferInfo
{
struct MinList FileList;
ULONG TotalSize;
LONG TotalFiles;
ULONG DoneSize;
LONG DoneFiles;
struct FileTransferNode *CurrentFile;
ULONG CurrentSize;
};
/* Global data link. */
struct TermPort
{
struct MsgPort ExecNode;
struct Window *TopWindow;
struct SignalSemaphore OpenSemaphore;
LONG ID,OpenCount,HoldIt;
LONG Reserved[5];
};
/* Buffer search support. */
struct SearchInfo
{
UBYTE Distance[256],
Pattern[256];
LONG FoundX,
FoundY;
WORD PatternWidth;
WORD Index;
BOOLEAN Forward,
IgnoreCase,
WholeWords;
};
struct SearchContext
{
struct Window *SearchWindow;
struct LayoutHandle *SearchHandle;
UBYTE LocalBuffer[256];
STRPTR Buffer;
BOOLEAN Ok;
};
/* Support for optimized scrolling routines. */
struct ScrollLineInfo
{
UWORD Left,Right,Width,
ColourMask;
};
/* A dial list entry. */
struct PhoneNode
{
struct Node VanillaNode;
UBYTE LocalName[50];
struct PhoneEntry *Entry;
};
/* A Fast! macro list entry. */
struct MacroNode
{
struct MacroNode *mn_Succ; /* Modeled after the default Node. */
struct MacroNode *mn_Pred;
WORD mn_Pad; /* Included only for Node compatibility. */
UBYTE *mn_Macro; /* = ln_Name, title */
UBYTE *mn_Code; /* The execution code. */
};
/* Speech preferences. */
struct SpeechConfig
{
WORD Rate,
Pitch;
LONG Frequency;
BYTE Sex,
Volume,
Enabled,
Pad;
};
/* Sound preferences */
struct SoundConfig
{
UBYTE BellFile[MAX_FILENAME_LENGTH],
ConnectFile[MAX_FILENAME_LENGTH],
DisconnectFile[MAX_FILENAME_LENGTH],
GoodTransferFile[MAX_FILENAME_LENGTH],
BadTransferFile[MAX_FILENAME_LENGTH],
RingFile[MAX_FILENAME_LENGTH],
VoiceFile[MAX_FILENAME_LENGTH];
BYTE Preload,
Pad;
BYTE Volume,
Pad2;
UBYTE ErrorNotifyFile[MAX_FILENAME_LENGTH];
};
/* Macro Preferences. */
struct MacroKeys
{
UBYTE Keys[4][10][256];
};
/* Cursor key preferences. */
struct CursorKeys
{
UBYTE Keys[4][4][256];
};
/* Translation table entry. */
struct TranslationEntry
{
STRPTR String; /* Corresponding code string. */
UBYTE Type; /* Table entry type. */
UBYTE Len; /* String length if any. */
UBYTE Extra; /* Saves space, don't need to allocate memory for this one. */
UBYTE Null; /* Terminating null. */
};
struct TranslationHeader
{
UBYTE Type; /* Table entry type. */
UBYTE Code; /* Table offset. */
UBYTE Len; /* Entry length. */
UBYTE Pad;
};
/* Buffer translation handle. */
struct TranslationHandle
{
STRPTR LocalBuffer;
LONG LocalLen;
STRPTR SourceBuffer;
LONG SourceLen;
STRPTR DestinationBuffer;
LONG DestinationLen;
struct TranslationEntry **Table;
};
/* term hotkey configuration. */
struct HotkeysOld
{
UBYTE termScreenToFront[256];
UBYTE BufferScreenToFront[256];
UBYTE SkipDialEntry[256];
BYTE CommodityPriority;
BYTE HotkeysEnabled;
ULONG Reserved[25];
};
struct Hotkeys
{
UBYTE termScreenToFront[256];
UBYTE BufferScreenToFront[256];
UBYTE SkipDialEntry[256];
BYTE CommodityPriority;
BYTE HotkeysEnabled;
ULONG Reserved[25];
UBYTE AbortARexx[256];
};
/* Time/date structure. */
struct TimeDate
{
LONG Count; /* Table size. */
WORD PayPerUnit[2], /* Pay for each unit. */
SecPerUnit[2]; /* Number of seconds each unit lasts. */
UBYTE Time, /* The time associated with this entry. */
Pad;
};
/* Time date header information. */
struct TimeDateHeader
{
UBYTE Comment[22]; /* Comment for this entry. */
BYTE Month, /* Month of year or -1 -> Day = bitmapped days of week. */
Day; /* Day of month or -1 -> standard settings. */
};
struct TimeDateNode
{
struct Node VanillaNode; /* Default node entry. */
UBYTE Buffer[30]; /* Name buffer. */
struct TimeDate *Table; /* Table of time/date entries. */
struct TimeDateHeader Header; /* Header information. */
};
struct TimeNode
{
struct Node VanillaNode; /* Default node entry. */
UBYTE Name[20]; /* Name string. */
UBYTE Time; /* The time for this entry. */
};
/* This node type links phone number patterns
* and date/time lists.
*/
struct PatternNode
{
struct Node Node;
UBYTE Pattern[256],
Comment[40];
struct List List;
};
/* Serial settings. */
struct SerialSettings
{
ULONG BaudRate; /* Baud rate. */
ULONG BreakLength; /* Length of break signal in microseconds. */
ULONG SerialBufferSize; /* Size of serial read/write buffer. */
UBYTE SerialDevice[MAX_FILENAME_LENGTH];
/* Serial device name. */
LONG UnitNumber; /* Serial device unit number. */
BYTE BitsPerChar; /* Bits per character. */
BYTE Parity; /* Parity check mode. */
BYTE StopBits; /* Number of stop bits. */
BYTE HandshakingProtocol; /* Handshaking protocol (RTS/CTS, etc.). */
BYTE Duplex; /* Full- or half-duplex? */
BYTE xONxOFF; /* xON/xOFF handshaking enabled? */
BYTE HighSpeed; /* Radboogie? */
BYTE Shared; /* Shared device access? */
BYTE StripBit8; /* Strip high-order bit? */
BYTE CheckCarrier; /* Track the carrier signal? */
BYTE PassThrough; /* Pass xON/xOFF characters through to modem? */
BYTE UseOwnDevUnit; /* Enable OwnDevUnit.library? */
ULONG Quantum; /* Buffer read quantum. */
BYTE IgnoreCarrier; /* Ignore carrier signal. */
BYTE UseNet; /* Use DNet-ID. */
UWORD NetID; /* The DNet-ID to use. */
BYTE SatisfyODURequests; /* How to satisfy ODU requests. */
BYTE DirectConnection; /* Directly connected to host? */
UWORD LastVersionSaved, /* The last version the config file was saved with. */
LastRevisionSaved;
BYTE ReleaseODUWhenOnline; /* Release the device even when online? */
BYTE ReleaseODUWhenDialing; /* Release the device even when dialing? */
BYTE NoODUIfShared; /* Don't use ODU when device is opened in shared mode? */
BYTE Pad;
};
/* Modem settings. */
struct ModemSettings
{
UBYTE ModemInit[80]; /* Modem init string. */
UBYTE ModemExit[80]; /* Modem exit string. */
UBYTE ModemHangup[80]; /* Modem hangup string. */
UBYTE DialPrefix[80]; /* Dial command prefix. */
UBYTE DialSuffix[80]; /* Dial command suffix. */
UBYTE NoCarrier[16]; /* `No carrier' string. */
UBYTE NoDialTone[16]; /* `No dialtone' string. */
UBYTE Connect[16]; /* `Connect' string. */
UBYTE Voice[16]; /* `Voice' string. */
UBYTE Ring[16]; /* `Ring' string. */
UBYTE Busy[16]; /* `Busy' string. */
LONG RedialDelay; /* Length of redial delay. */
LONG DialRetries; /* Number of dial retries. */
LONG DialTimeout; /* Length of dial timeout. */
BYTE ConnectAutoBaud; /* Use baud rate returned by modem? */
BYTE DropDTR; /* Drop the DTR signal on hangup? */
BYTE RedialAfterHangup; /* Redial list after hangup? */
BYTE VerboseDialing; /* Output modem responses while dialing? */
UBYTE Ok[16]; /* `Ok' string. */
UBYTE Error[16]; /* `Error' string. */
BYTE NoCarrierIsBusy; /* Treat `NO CARRIER' as `BUSY' signal? */
BYTE AbortHangsUp; /* Dialer `Abort' sends hangup string? */
WORD ConnectLimit; /* Connection limit. */
UBYTE ConnectLimitMacro[MAX_FILENAME_LENGTH]; /* Macro to be executed when limit is reached. */
LONG TimeToConnect; /* Number of seconds to pass between modem picking up
* the line and issuing the `CONNECT' message.
*/
BYTE DialMode; /* Use tone or pulse dialing? */
BYTE DoNotSendMainModemCommands; /* Do not send modem init/exit commands when dialing and using the main configuration? */
LONG InterDialDelay; /* Seconds to wait between two successive dial attempts. */
LONG CharSendDelay; /* Microseconds to wait between chars to send. */
UBYTE PBX_Prefix[80]; /* Additional commands to insert between dial prefix and phone number. */
BYTE PBX_Mode; /* Send the prefix above. */
BYTE Pad;
};
/* Command settings. */
struct CommandSettings
{
UBYTE StartupMacro[256]; /* Startup macro. */
UBYTE LogoffMacro[256]; /* Macro executed after carrier has dropped or hung up. */
UBYTE UploadMacro[256]; /* Macro to execute after a successful upload. */
UBYTE DownloadMacro[256]; /* Macro to execute after a successful download. */
UBYTE LoginMacro[256]; /* Login macro, complements the logoff macro. */
};
/* Screen settings. */
struct ScreenSettings
{
ULONG DisplayMode; /* Screen display mode. */
WORD ColourMode; /* The terminal colour mode. */
UWORD Colours[16]; /* Colour palette. */
UBYTE FontName[MAX_FILENAME_LENGTH]; /* Default user interface font. */
WORD FontHeight; /* Default user interface font height. */
BYTE MakeScreenPublic; /* Are we to make our screen public? */
BYTE ShanghaiWindows; /* Are we to `shanghai' windows? */
BYTE Blinking; /* Screen blinking enabled? */
BYTE FasterLayout; /* Faster screen layout? */
BYTE TitleBar; /* Is the screen title bar enabled? */
BYTE StatusLine; /* Which mode is the status line in? */
BYTE UseWorkbench; /* Use the Workbench screen for the terminal window? */
UBYTE PubScreenName[MAXPUBSCREENNAME + 1]; /* Name of public screen to open window upon. */
BYTE TimeMode; /* Online time/fee display. */
BYTE Depth; /* Screen depth if any, 0 = don't bother. */
BYTE UsePens; /* Use special screen pens? */
BYTE PenColourMode; /* For which colour mode was the pen array built? */
UWORD PenArray[16]; /* Pen index array. */
ULONG DisplayWidth, /* Screen width. */
DisplayHeight; /* Screen height. */
UWORD OverscanType; /* Screen overscan type. */
BYTE ShareScreen; /* Don't open a backdrop window, share pens. */
BYTE SplitStatus; /* Split the status line from the main window. */
BYTE Pad;
BYTE UseColours96; /* Use the 96 bit colours? */
ULONG Colours96[16 * 3]; /* The 96 bit colour table. */
};
/* Terminal settings. */
struct TerminalSettings
{
BYTE BellMode; /* The bell mode. */
BYTE AlertMode; /* The user alert mode. */
BYTE EmulationMode; /* The terminal emulation mode. */
BYTE FontMode; /* The font mode. */
BYTE SendCR; /* Standard translations. */
BYTE SendLF;
BYTE ReceiveCR;
BYTE ReceiveLF;
UWORD NumColumns, /* Size of the terminal window. */
NumLines;
UBYTE KeyMapFileName[MAX_FILENAME_LENGTH]; /* Name of custom keymap file. */
UBYTE EmulationFileName[MAX_FILENAME_LENGTH]; /* External emulation file name. */
UBYTE BeepFileName[MAX_FILENAME_LENGTH]; /* Name of the custom beep sound file. */
UBYTE TextFontName[MAX_FILENAME_LENGTH]; /* Terminal text font name. */
WORD TextFontHeight; /* Terminal text font height. */
BYTE UseTerminalTask; /* Enable the terminal emulation process. */
BYTE Pad;
UBYTE IBMFontName[MAX_FILENAME_LENGTH]; /* Terminal text font name. */
WORD IBMFontHeight; /* Terminal text font height. */
};
/* Path settings. */
struct PathSettings
{
UBYTE ASCIIUploadPath[MAX_FILENAME_LENGTH]; /* Default ASCII upload file path. */
UBYTE ASCIIDownloadPath[MAX_FILENAME_LENGTH]; /* Default ASCII download file path. */
UBYTE TextUploadPath[MAX_FILENAME_LENGTH]; /* Default text upload file path. */
UBYTE TextDownloadPath[MAX_FILENAME_LENGTH]; /* Default text download file path. */
UBYTE BinaryUploadPath[MAX_FILENAME_LENGTH]; /* Default binary data upload file path. */
UBYTE BinaryDownloadPath[MAX_FILENAME_LENGTH]; /* Default binary data download file path. */
UBYTE DefaultStorage[MAX_FILENAME_LENGTH]; /* Default configuration storage path. */
UBYTE Editor[MAX_FILENAME_LENGTH]; /* Text file editor to use. */
UBYTE HelpFile[MAX_FILENAME_LENGTH]; /* Help text file. */
};
/* Miscellaneous settings. */
struct MiscSettings
{
BYTE Priority; /* Program priority. */
BYTE BackupConfig; /* Save the configuration between calls? */
BYTE OpenFastMacroPanel; /* Open the fast! macro panel? */
BYTE ReleaseDevice; /* Release serial device when iconified? */
BYTE TransferServer; /* Enable data transfer server? */
BYTE EmulationServer; /* Enable terminal emulation server? */
BYTE OverridePath; /* Override the protocol transfer path? */
BYTE AutoUpload; /* Enable the auto-upload panel? */
BYTE SetArchivedBit; /* Set the archived bit for files sent? */
BYTE IdentifyFiles; /* Try to identify files after download? */
BYTE TransferIcons; /* Transfer files along with their icons? */
BYTE CreateIcons; /* Create icons for files saved? */
BYTE SimpleIO; /* Use simple file I/O? */
BYTE PerfMeter; /* Transfer performance meter enabled? */
LONG IOBufferSize; /* Size of the asynchronous I/O buffer. */
BYTE HideUploadIcon; /* Hide the upload queue icon? */
BYTE ProtectiveMode; /* Give hints and ask for confirmation? */
BYTE AlertMode; /* The user alert mode. */
BYTE RequesterMode; /* Centre, ignore, use preference? */
UWORD RequesterWidth, /* Width of asl requesters. */
RequesterHeight; /* Height of asl requesters. */
UWORD RequesterLeft, /* Left edge of asl requesters. */
RequesterTop; /* Top edge of asl requesters. */
};
/* Clipboard settings. */
struct ClipSettings
{
WORD ClipboardUnit; /* Clipboard unit to use. */
WORD LineDelay, /* Insert line delay. */
CharDelay; /* Insert character delay. */
UBYTE InsertPrefix[80]; /* Line insertion prefix. */
UBYTE InsertSuffix[80]; /* Line insertion suffix. */
UBYTE LinePrompt[256]; /* Line wait prompt. */
WORD SendTimeout; /* Line send timeout. */
UBYTE PacingMode; /* Text pacing mode. */
BYTE ConvertLF; /* Convert <LF> characters to <CR> */
};
/* Capture and logfile settings. */
struct CaptureSettings
{
BYTE LogActions; /* Create logfile? */
BYTE LogCall; /* Create callinfo-compatible logfile? */
UBYTE LogFileName[MAX_FILENAME_LENGTH]; /* Default logfile name. */
LONG MaxBufferSize; /* Maximum text buffer size. */
BYTE BufferEnabled; /* Is the text buffer enabled? */
BYTE ConnectAutoCapture; /* Open capture file on logon? */
BYTE CaptureFilterMode; /* The capture filter mode. */
UBYTE CapturePath[MAX_FILENAME_LENGTH]; /* The default path for capture files. */
UBYTE CallLogFileName[MAX_FILENAME_LENGTH]; /* Name of the call log file. */
UBYTE BufferPath[MAX_FILENAME_LENGTH]; /* Text buffer save path. */
BYTE AutoCaptureDate; /* Where to include the creation date? */
UBYTE SearchHistory;
BYTE OpenBufferWindow; /* Where to open the buffer window. */
BYTE OpenBufferScreen; /* Where to open the buffer screen. */
BYTE BufferScreenPosition; /* Where to place the buffer screen (horizontal) */
UBYTE BufferWidth; /* How long each line in the buffer should be. */
BYTE RememberBufferWindow; /* Remember buffer window context? */
BYTE RememberBufferScreen; /* Remember buffer screen context? */
ULONG BufferScreenMode; /* Screen display mode for buffer screen. */
BYTE ConvertChars; /* Convert IBM characters? */
BYTE BufferMode; /* How the capture buffer should receive data. */
};
/* File settings. */
struct FileSettings
{
UBYTE ProtocolFileName[MAX_FILENAME_LENGTH]; /* Transfer protocol file name. */
UBYTE TranslationFileName[MAX_FILENAME_LENGTH]; /* Character translation file name. */
UBYTE MacroFileName[MAX_FILENAME_LENGTH]; /* Keyboard macro file name. */
UBYTE CursorFileName[MAX_FILENAME_LENGTH]; /* Cursor key file name. */
UBYTE FastMacroFileName[MAX_FILENAME_LENGTH]; /* Fast macro file name. */
};
/* Emulation settings. */
struct EmulationSettings
{
BYTE CursorMode; /* Are the cursor keys switched to application mode? */
BYTE NumericMode; /* Is the numeric keypad switched to application mode? */
BYTE CursorWrap; /* Is cursor position wrapping enabled? */
BYTE LineWrap; /* Is character line wrapping enabled? */
BYTE InsertMode; /* Is the character insertion mode enabled? */
BYTE NewLineMode; /* Is the newline mode enabled? */
BYTE FontScale; /* Which font scale is enabled? */
BYTE ScrollMode; /* Is smooth scrolling enabled? */
BYTE DestructiveBackspace; /* Backspace erases characters? */
BYTE SwapBSDelete; /* DEL and BS keys are swapped? */
BYTE PrinterEnabled; /* Printer commands enabled? */
BYTE CLSResetsCursor; /* Clear screen command resets cursor position? */
UBYTE AnswerBack[80]; /* Answer-back message. */
BYTE KeysLocked; /* Numeric keypad mode locked? */
UBYTE MaxScroll; /* Maximum number of lines to prescroll. */
UBYTE MaxJump; /* Maximum number of lines to scroll in one jump. */
BYTE CursorLocked; /* Cursor keys locked? */
BYTE FontLocked; /* Font size locked? */
BYTE LockWrapping; /* Line wrapping locked? */
BYTE LockStyle; /* Text style locked? */
BYTE LockColour; /* Text colour locked? */
BYTE UseStandardPens; /* Use the standard pens/attributes? */
BYTE TerminalType; // How to identify ourselves (VT100 or VT200)
UBYTE Attributes[4]; /* Attribute mappings. */
UWORD Pens[16]; /* Rendering pens. */
};
struct TransferSignature
{
UBYTE Signature[40];
WORD Length;
};
/* File transfer library settings. */
struct TransferSettings
{
UBYTE DefaultLibrary[MAX_FILENAME_LENGTH],
ASCIIUploadLibrary[MAX_FILENAME_LENGTH],
ASCIIDownloadLibrary[MAX_FILENAME_LENGTH],
TextUploadLibrary[MAX_FILENAME_LENGTH],
TextDownloadLibrary[MAX_FILENAME_LENGTH],
BinaryUploadLibrary[MAX_FILENAME_LENGTH],
BinaryDownloadLibrary[MAX_FILENAME_LENGTH];
BYTE InternalASCIIUpload,
InternalASCIIDownload,
QuietTransfer,
MangleFileNames;
WORD LineDelay, /* Insert line delay. */
CharDelay; /* Insert character delay. */
UBYTE LinePrompt[256]; /* Line wait prompt. */
WORD SendTimeout; /* Line send timeout. */
UBYTE PacingMode; /* Text pacing mode. */
BYTE StripBit8; /* Strip high order bit. */
BYTE IgnoreDataPastArnold; /* Ignore data past terminator. */
UBYTE TerminatorChar; /* Terminator character. */
BYTE SendCR,
SendLF,
ReceiveCR,
ReceiveLF;
UWORD ErrorNotification; /* Notify user after <n> errors have occured. */
BYTE TransferNotification; /* Notify the user when a transfer has started/finished? */
BYTE DefaultType,
ASCIIDownloadType,
ASCIIUploadType,
TextDownloadType,
TextUploadType,
BinaryUploadType,
BinaryDownloadType;
struct TransferSignature Signatures[TRANSFERSIG_BINARYDOWNLOAD + 1];
BYTE OverridePath; /* Override the protocol transfer path? */
BYTE SetArchivedBit; /* Set the archived bit for files sent? */
BYTE IdentifyFiles; /* Try to identify files after download? */
BYTE TransferIcons; /* Transfer files along with their icons? */
BYTE PerfMeter; /* Transfer performance meter enabled? */
BYTE HideUploadIcon; /* Hide the upload queue icon? */
};
/* The new configuration settings. */
struct Configuration
{
struct SerialSettings *SerialConfig;
struct ModemSettings *ModemConfig;
struct ScreenSettings *ScreenConfig;
struct TerminalSettings *TerminalConfig;
struct EmulationSettings *EmulationConfig;
struct ClipSettings *ClipConfig;
struct CaptureSettings *CaptureConfig;
struct CommandSettings *CommandConfig;
struct MiscSettings *MiscConfig;
struct PathSettings *PathConfig;
struct FileSettings *FileConfig;
struct TransferSettings *TransferConfig;
STRPTR TranslationFileName;
STRPTR MacroFileName;
STRPTR CursorFileName;
STRPTR FastMacroFileName;
};
/* Phonebook entry header. */
struct PhoneHeader
{
UBYTE Name[40], /* BBS name. */
Number[100], /* Phone number. */
Comment[100]; /* Comment. */
UBYTE UserName[100], /* User name for this BSS. */
Password[100]; /* Password for user name. */
BOOLEAN QuickMenu; /* This entry appears in the quick dial menu? */
BOOLEAN NoRates; /* Do not use rate information. */
ULONG ID; /* Unique ID of this entry. */
struct timeval Creation; /* Creation time. */
BOOLEAN AutoDial; /* Put this entry on the autodial list. */
BOOLEAN Pad;
};
/* A phonebook entry. */
struct PhoneEntry
{
struct PhoneNode *Node;
struct MinList TimeDateList;
LONG Count;
struct PhoneGroupNode *ThisGroup;
struct PhoneNode *NodeGroup;
struct PhoneHeader *Header;
struct Configuration *Config;
};
/* A text box for several lines of text. */
struct TextBox
{
struct TextBox *NextBox; /* Next box in chain. */
LONG Left,Top, /* Position and size. */
Width,Height;
LONG LineWidth, /* Line width in pixels. */
LineHeight; /* Line height in pixels. */
LONG NumChars, /* Number of chars per line. */
NumLines; /* Number of lines. */
STRPTR *Title, /* Line titles. */
*Text; /* Line texts. */
LONG TitleFgPen,
TitleBgPen,
TextPen;
};
/* Block marker structure. */
struct BlockMarker
{
/* The object to manipulate. */
APTR Object;
/* Selection and unselection routines. */
VOID (* Select)(struct BlockMarker *Marker,LONG Left,LONG Top,LONG Width,LONG Height);
VOID (* Unselect)(struct BlockMarker *Marker,LONG Left,LONG Top,LONG Width,LONG Height);
/* Origin anchor point. */
LONG OriginX,
OriginY;
/* First and last selected line. */
LONG FirstLine,
LastLine;
/* First and last selected column. */
LONG FirstColumn,
LastColumn;
/* Top of display window, lines in the buffer and size of
* the display window.
*/
LONG Top,
Lines,
Width,
Height;
/* Canvas left and top edge. */
LONG LeftEdge,
TopEdge;
/* Last mouse position. */
LONG LastX,
LastY;
/* Single character dimensions. */
LONG TextFontWidth,
TextFontHeight;
/* Plane write mask. */
UBYTE WriteMask;
};
/* Global data flow <-> term interface. */
struct FlowInfo
{
BYTE Changed;
BYTE NoCarrier;
BYTE Connect,
Voice,
Ring,
Busy,
NoDialTone,
Ok,
Error;
BYTE Signature;
};
/* A scan sequence, somewhat similar to the FlowInfo structure. */
struct WaitNode
{
struct Node Node;
LONG Count; /* Number of characters matched. */
STRPTR Response; /* Immediate response. */
LONG ResponseLen; /* Length of immediate response string. */
};
struct DialNode
{
struct Node Node; // List link
struct PhoneEntry *Entry; // Points to the configuration data
};
/* A list as employed by the ARexx interface. */
struct GenericList
{
struct MinList ListHeader;
struct Node *ListNode;
LONG ListCount;
struct SignalSemaphore ListSemaphore;
};
/* Number of buffers to be used for buffered I/O. */
#define BUFFER_NUMBER 2
/* Auxiliary structure for buffered file I/O. */
struct Buffer
{
struct Message Message; /* Vanilla message header. */
BYTE SimpleIO; /* Real simple I/O? */
BYTE Pad;
BYTE Read; /* Last access has read data. */
BYTE Written; /* Last access has written data. */
LONG Action; /* Action to perform. */
LONG ActionData[2]; /* Seek and the like. */
LONG Result; /* Return value. */
BPTR FileHandle; /* Dos filehandle. */
UBYTE *Data; /* Data buffer. */
LONG BufLength; /* Length of data buffer. */
LONG BufPosition; /* Read/write pointer into buffer. */
LONG ReadBufFull; /* How many bytes are still to be read from the buffer? */
LONG WriteBufFull; /* How many bytes are still to be written to the buffer?*/
LONG RealPosition; /* Real position in file. */
LONG Cached; /* How many bytes in pre-load cache. */
UBYTE *DataBuffer[BUFFER_NUMBER]; /* The data buffers. */
LONG DataLength[BUFFER_NUMBER]; /* The lengths of the data buffers. */
WORD DataCount; /* Which buffer to use. */
BYTE WriteAccess; /* TRUE if a write file handle. */
BYTE LastActionFailed; /* TRUE if last action failed -> abort actions. */
struct Process *Child;
struct Process *Caller; /* Synchronization. */
struct MsgPort *InfoPort; /* The filing system the destination file handle is bound to. */
struct InfoData __aligned InfoData;
BYTE Fresh; /* TRUE if no read/write access has taken place yet. */
BYTE Used; /* Did any access take place at all? */
struct DateStamp OpenDate; /* Date and time when file was opened. */
};
/* xpr serial bits. */
#define ST_PARTYON (1L << 0)
#define ST_PARTYODD (1L << 1)
#define ST_7WIRE (1L << 2)
#define ST_QBREAK (1L << 3)
#define ST_RADBOOGIE (1L << 4)
#define ST_SHARED (1L << 5)
#define ST_EOFMODE (1L << 6)
#define ST_XDISABLED (1L << 7)
#define ST_PARTYMARKON (1L << 8)
#define ST_PARTYMARK (1L << 9)
#define ST_2BITS (1L << 10)
#define ST_READ7 (1L << 11)
#define ST_WRITE7 (1L << 12)
/* Miscellaneous definitions. */
#define MILLION 1000000
/* Raster text line attributes. */
#define ATTR_UNDERLINE 1
#define ATTR_HIGHLIGHT 2
#define ATTR_BLINK 4
#define ATTR_INVERSE 8
enum { TEXTATTR_UNDERLINE,TEXTATTR_HIGHLIGHT,
TEXTATTR_BLINK,TEXTATTR_INVERSE,
TEXTATTR_NONE
};
/* Audio channels. */
#define LEFT0F 1
#define RIGHT0F 2
#define RIGHT1F 4
#define LEFT1F 8
/* Program revision and the appropriate info structure. */
struct TermInfo
{
UWORD Version;
UWORD Revision;
};
/**********************************************************************/
// This defines the destructor data type
typedef VOID (* __stdargs DESTRUCTOR)(struct MsgItem *);
// A message queue handle
struct MsgQueue
{
struct SignalSemaphore Access; // Access semaphore
struct MinList MsgList; // This is where the queue items go
LONG QueueSize, // The length of the queue
MaxSize; // The maximum size of the queue, may be 0
struct MinList WaitList; // The list of tasks to wait for a wakeup signal
struct Task *SigTask; // The owner of this handle
ULONG SigMask; // The signal mask to wake up the owner
WORD SigBit; // The bit allocated for the mask, may be -1
BOOL Discard; // Discard or queue new items?
};
// A message item as used by the queue manager
struct MsgItem
{
struct MinNode Link; // List node link
DESTRUCTOR Destructor; // Destructor routine if any
};
// Your simple message item destructor setup
#define InitMsgItem(Item,Dest) (((struct MsgItem *)Item) -> Destructor = (Dest))
/**********************************************************************/
enum { DATAMSGTYPE_WRITE,DATAMSGTYPE_WRITECLIP,
DATAMSGTYPE_UPDATEREVIEW,DATAMSGTYPE_MOVEREVIEW,
DATAMSGTYPE_SERIALCOMMAND,DATAMSGTYPE_UPLOAD,
DATAMSGTYPE_COMMANDDONE,DATAMSGTYPE_MENU,
DATAMSGTYPE_RENDEZVOUS,DATAMSGTYPE_SERIALCOMMANDNOECHO,
DATAMSGTYPE_CLEARBUFFER
};
// An extension of the MsgItem data type
struct DataMsg
{
struct MsgItem Item; // The message item link
LONG Type; // Message type
UBYTE * Data; // Pointer to data area
LONG Size; // Size of data area
struct Task * Client; // Client task to signal
ULONG Mask; // Client signal mask
};
// An extension of the DataMsg data type
struct DataReplyMsg
{
struct DataMsg Data; // DataMsg link
struct Task * Creator; // Creator to notify
ULONG CreatorMask; // Creator notification signal
};
/**********************************************************************/
// Serial device attributes
#define SERA_Baud TAG_USER+1 // Baud rate
#define SERA_BreakTime TAG_USER+2 // Break time
#define SERA_BitsPerChar TAG_USER+3 // Bits per character
#define SERA_StopBits TAG_USER+4 // Number of stop bits
#define SERA_BufferSize TAG_USER+5 // Read/Write buffer size
#define SERA_Parity TAG_USER+6 // Parity
#define SERA_Handshaking TAG_USER+7 // Handshaking mode
#define SERA_HighSpeed TAG_USER+8 // Highspeed mode
#define SERA_Shared TAG_USER+9 // Shared access
/**********************************************************************/
/* One of the emulation callback routines. */
typedef VOID (* EPTR)(STRPTR Buffer);
/* This structure describes an ANSI control sequence. */
struct ControlCode
{
UBYTE FirstChar;
STRPTR Match,
Terminator;
UBYTE LastChar;
BYTE ExactSize;
EPTR Func;
};
/**********************************************************************/
/* A 96 bit colour entry. */
typedef struct ColourEntry
{
WORD One,
Which;
ULONG Red,
Green,
Blue;
} ColourEntry;
/* A table of colour entries, ready for LoadRGB32(). */
typedef struct ColourTable
{
WORD NumColours;
struct ColourEntry Entry[0];
WORD Terminator;
} ColourTable;
/* Spread a byte across a long word. */
#define SPREAD(v) ((ULONG)(v) << 24 | (ULONG)(v) << 16 | (ULONG)(v) << 8 | (v))
/**********************************************************************/
/* AmigaUW terminal window resize support. */
#define UWCMD_TTYRESIZE (CMD_NONSTD)+20
/**********************************************************************/
typedef struct PhonebookHandle
{
struct PhoneEntry **Phonebook;
LONG PhoneSize;
LONG NumPhoneEntries;
struct MinList *PhoneGroupList;
ULONG PhonebookID;
ULONG DefaultGroup;
UBYTE PhonePassword[256];
BOOLEAN PhonePasswordUsed;
BOOLEAN AutoDial;
BOOLEAN AutoExit;
} PhonebookHandle;
typedef struct PhoneGroupNode
{
struct Node Node;
UBYTE LocalName[40];
struct MinList GroupList;
} PhoneGroupNode;
typedef struct PhonebookGlobals
{
ULONG Count; // Number of entries in this phonebook
ULONG ID; // ID counter for this phonebook
ULONG DefaultGroup; // Number of the group the phonebook displays when first opened
BOOLEAN AutoDial; // Start dialing after program is started
BOOLEAN AutoExit; // Exit program after list is dialed
} PhonebookGlobals;
typedef struct PhoneGroupHeader
{
UBYTE FullName[40]; // Name of this very group
LONG Count; // Number of entries to follow
UBYTE Pad[8]; // For future extension, if necessary
} PhoneGroupHeader;
/**********************************************************************/
/* And now for something completely different... */
#include "termProtos.h"
#include "termData.h"
#include "termErrors.h"